<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" CONTENT="-1">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<link rel="stylesheet" href="{:C('VSHOP_CSS')}index.css"/>
<link rel="stylesheet" href="{:C('VSHOP_CSS')}person.css"/>
<script src="{:C('VSHOP_JS')}jquery-1.9.1.min.js"></script>
<script src="{:C('VSHOP_JS')}jquery.js"></script>
<script src="{:C(VSHOP_JS)}public.js"></script>

</head>
<body>
<header>
  <div class="head"><a href="{:U('User/index')}" class="head-return"></a>
    <h2 class="head-title">我的订单</h2>
  </div>
</header>
<div class="my-tab-title">
  <ul>
    <a  href="{:U('Order/index')}" >我的订单</li>
    <a  href="{:U('Order/payment')}" >已付款</li>
    <a  href="{:U('Order/unpay')}" >待付款</li>
  </ul>
</div>
<div class="my-tab-box" id='unpay' >
  <!--未付款订单st-->
  <ul>
    <div class="cart-pro-box" id="unpay">

    <foreach name="unpay" item="un">
      <dl>
        <main style="clear:both;">
          <dd><span class="left-pic"><img src="{:C('SITENAME')}{$un['img']}"></span><span class="right-info">
            <p class="f14">{$un.itemname}</p>
            <p><strong class="red f14">￥{$un.order_amount}</strong></p>
            <p class="gray">未付款</p>
            </span>
            <div class="price">
              <p>x{$un.number}</p>
            </div>
          </dd>
           <div class="blank15"></div>
            <div style="overflow:hidden;">
           <a href="{:U('Order/payStyle',array('orderid'=>$un['orderid']))}" class="btn-small-red right ml-20" style="width:80px;height:30px; line-height:30px; font-size:14px" value="{$un.orderid}">去付款</a>
           <a href="javascript:void(0);"  style="width:80px;height:30px; line-height:30px; font-size:14px" class="btn-small-gray right"  onclick="$.order.cut({$un['orderid']})" value="{$un.orderid}" onclick="$.order.cut({$un['orderid']})" >取订单</a>
           </div> </main>
          
      </dl>

      </foreach>
    </div>
  </ul>
  <!--未付款en-->

</div>
<div class="blank15"></div>
<notempty name="unpay">
<div style="width:50%; margin:0 auto;">
<a href="{:U('Order/unpay',array('page'=>$pagearr['prevpage']))}"   class="btn-more" style="width:40%;float:left" >上一页</a>
  <a href="{:U('Order/unpay',array('page'=>$pagearr['nextpage']))}"   class="btn-more" style="width:40%;float:right" >下一页</a>
  </div>
  </notempty>

<div class="blank10"></div>
<script type="text/javascript">
  ////取消订单
  $(function(){
    $.order={
      cut:function(){
      var orderid=arguments[0];//购物车ID
      var res=confirm("确定要取消该订单吗");
      if(res==false)
      {
        return false;
      }
       jQuery.get('{:U("Order/cancel")}',
              {id:orderid,},
              function(data){
                if(data==1)
                {
                alert("订单取消成功");
                   location.reload();

                }

              },'text')///修改数据库end
     

      }////cut end

    }////order end
  })

</script>

</body>
</html>
